package com.nbsaas.boot.miaosha.data.entity;

import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;

@Data
@Entity
@Table(name = "miaosha_item")
public class MiaoshaItem extends AbstractEntity {

    @Comment("商品ID")
    private String wareId;

    @Comment("秒杀活动id")
    @JoinColumn(name = "miao_sha_group")
    @ManyToOne(fetch = FetchType.LAZY)
    private MiaoshaGroup miaoshaGroup;

    @Column(name = "wname")
    @Comment("商品名称")
    private String wname;

    @Column(name = "shortWname")
    @Comment("商品简称")
    private String shortWname;

    @Column(name = "imageurl")
    @Comment("商品图片URL")
    private String imageurl;

    @Column(name = "jdPrice")
    @Comment("京东价格")
    private String jdPrice;

    @Column(name = "book")
    @Comment("是否预订")
    private boolean book;

    @Column(name = "promotion")
    @Comment("是否促销")
    private boolean promotion;

    @Column(name = "spuId")
    @Comment("SPU ID")
    private String spuId;

    @Column(name = "adword")
    @Comment("广告词")
    private String adword;

    @Column(name = "message")
    @Comment("消息")
    private String message;

    @Column(name = "canBuy")
    @Comment("可购买")
    private boolean canBuy;

    @Column(name = "miaoSha")
    @Comment("是否秒杀")
    private boolean miaoSha;

    @Column(name = "rate")
    @Comment("折扣率")
    private String rate;

    @Column(name = "startRemainTime")
    @Comment("开始剩余时间")
    private long startRemainTime;

    @Column(name = "endRemainTime")
    @Comment("结束剩余时间")
    private long endRemainTime;

    @Column(name = "miaoShaPrice")
    @Comment("秒杀价格")
    private String miaoShaPrice;

    @Column(name = "discount")
    @Comment("折扣金额")
    private String discount;

    @Column(name = "activeId")
    @Comment("活动ID")
    private String activeId;

    @Column(name = "canFreeRead")
    @Comment("可免费阅读")
    private boolean canFreeRead;

    @Column(name = "moreFunId")
    @Comment("更多功能ID")
    private String moreFunId;

    @Column(name = "cid")
    @Comment("分类ID")
    private String cid;

    @Column(name = "cName")
    @Comment("分类名称")
    private String cName;

    @Column(name = "sourceValue")
    @Comment("来源值")
    private String sourceValue;

    @Column(name = "sourceValueMapStr")
    @Comment("来源值映射字符串")
    private String sourceValueMapStr;

    @Column(name = "operateWord")
    @Comment("操作词")
    private String operateWord;

    @Column(name = "promotionId")
    @Comment("促销ID")
    private String promotionId;

    @Column(name = "almostSoldoutViewUser")
    @Comment("几乎售完的查看用户")
    private int almostSoldoutViewUser;

    @Column(name = "clockNum")
    @Comment("闹钟数量")
    private int clockNum;

    @Column(name = "lowestPriceDaysInfo")
    @Comment("最低价格天数信息")
    private String lowestPriceDaysInfo;

    @Column(name = "lowestPriceDays")
    @Comment("最低价格天数")
    private int lowestPriceDays;

    @Column(name = "startTimeShow")
    @Comment("开始时间显示")
    private String startTimeShow;

    @Column(name = "resultSort")
    @Comment("结果排序")
    private int resultSort;

    @Column(name = "startTimeMills")
    @Comment("开始时间毫秒")
    private long startTimeMills;

    @Column(name = "isNewGoods")
    @Comment("是否新品")
    private int isNewGoods;

    @Column(name = "clk")
    @Comment("点击")
    private String clk;

    @Column(name = "promoType")
    @Comment("促销类型")
    private int promoType;

    @Column(name = "promoExtType")
    @Comment("促销扩展类型")
    private int promoExtType;

    @Column(name = "seckillProdType")
    @Comment("秒杀商品类型")
    private String seckillProdType;

    @Column(name = "bubbleTips")
    @Comment("气泡提示")
    private String bubbleTips;

    @Column(name = "isHistoryProduct")
    @Comment("是否历史产品")
    private boolean isHistoryProduct;

    @Column(name = "sourceType")
    @Comment("来源类型")
    private int sourceType;

    @Column(name = "shopType")
    @Comment("店铺类型")
    private int shopType;

    @Column(name = "priceDiscountText")
    @Comment("价格折扣文本")
    private String priceDiscountText;

    @Column(name = "displayPrice")
    @Comment("显示价格")
    private String displayPrice;

    @Column(name = "displayPriceType")
    @Comment("显示价格类型")
    private int displayPriceType;

    @Column(name = "biInfo")
    @Comment("BI信息")
    private String biInfo;

    @Column(name = "platformTestId")
    @Comment("平台测试ID")
    private String platformTestId;

    @Column(name = "seckillType")
    @Comment("秒杀类型")
    private int seckillType;

    @Column(name = "spuSelect")
    @Comment("SPU选择")
    private int spuSelect;

    @Column(name = "cateDiscount")
    @Comment("分类折扣")
    private String cateDiscount;

    @Column(name = "isLimitBuy")
    @Comment("是否限购")
    private boolean isLimitBuy;

    @Column(name = "hashKey")
    @Comment("哈希键")
    private long hashKey;

    // 构造函数、getter和setter方法省略
}
